<#include  "/common/taglibs.ftl">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mytrip后台管理系统</title>
<link rel="stylesheet" type="text/css" href="${base}/css/admin.css" />
</head>
<body>
<style type="text/css">
   #noiehide {display:none}
   .t1{height:24px;width:140px;}
</style>
<div id="noiehide">
	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
	  <tr>
	    <td align="center">
	    
	    
	      <table width="610" border="0" cellspacing="0" cellpadding="0">
	      <@s.form action="backendLogin" id="loginForm">
	        <tr>
	          <td><img src="${base}/img/login1.gif" width="610" height="92"></td>
	        </tr>
	        <tr>
	          <td><img src="${base}/img/login2.gif" width="610" height="92"></td>
	        </tr>
	        <tr>
	          <td height="108" style="background:transparent url(${base}/img/login3.gif) repeat-y;">
	            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
	            
	            <tr>
	                <td width="10%" align="center"></td>
	                <td width="90%"  align="left">
	                  <#assign actionErrors = stack.findValue("actionErrors")?if_exists/>
			   		 <#include  "/common/actionerrors.ftl">
	                </td>
	              </tr>
	              
	              <tr>
	                <td width="10%" align="center" style="height:25px;">用户名</td>
	                <td width="90%"  align="left">
	                  <input type="input" name="backOperatorDto.exactUserName" id="username" size="18" class="t1"/>
	                </td>
	              </tr>
	              <tr>
	                <td align="center" style="height:25px;">密　码</td>
	                <td align="left">
	                  <input type="password" name="backOperatorDto.originalPassword" id="password" size="18" class="t1"/>
	                </td>
	              </tr>
	              <tr>
	                <td height="30">&nbsp;</td>
	                <td align="left"><input type="button" class="button" id="subBtn" value="提交" onclick="javascript:checkLogin();return false" /></td>
	              </tr>
	            </table>
	          </td>
	        </tr>
	        <tr>
	          <td><img src="${base}/img/login4.gif" width="610" height="54"></td>
	        </tr>
	        </@s.form>
	      </table>
	    </td>
	  </tr>
	</table>
</div>
<script type="text/javascript" src="${base}/js/dwr/engine.js"></script>
<script type='text/javascript' src='${base}/dwr/interface/backendLoginAction.js'></script>
<script type="text/javascript">
	var m=(navigator.userAgent.match(/msie (\d+)/i));
	var ie=(m!=null&&m[1]>=7);
	var ns=((navigator.userAgent.indexOf("Firefox")>0)&&(parseInt(navigator.appVersion) >=4));
	document.getElementById('noiehide').style.display='block';
	
	var reg=/\s/g;
	var checkLogin=function(){
		var username=document.getElementById('username');
		var password=document.getElementById('password');
		username.value=username.value.replace(reg,'');
		password.value=password.value.replace(reg,'');
		
		var u=username.value;
		var p=password.value;
		
		if(u&&p){
			document.getElementById('subBtn').style.display='none';
			backendLoginAction.checkLogin(u,p,function(res){
				if(res){
					document.getElementById('loginForm').submit();
				}else{
					document.getElementById('subBtn').style.display='block';
					alert('wrong username or password');
					username.focus();
					username.select();
				}
			});
		}
	}
</script>
</body>
</html>
